#ifndef SES_LED_H_
#define SES_LED_H_

#include <avr/io.h>
#include <util/delay.h>
#include <stdint.h>
#include "ses_common.h"



/*
 * Provides an interface for controlling the behavior of the LEDs.
 *
 * Provides functionality for:
 * \li Switching on an LED
 * \li Switching off an LED
 * \li Toggling an LED
 *
 * Controls 3 LEDs:
 * \li red
 * \li yellow
 * \li green
 */



// LED wiring on SES board
#define LED_RED_PORT       	PORTG
#define LED_RED_PIN         	1

#define LED_YELLOW_PORT 	PORTF
#define LED_YELLOW_PIN      	7

#define LED_GREEN_PORT 		PORTF
#define LED_GREEN_PIN       	6



/*
 * Initializes red, yellow, and green LED, and switches them off.
 */
void led_allInit(void);

/*
 * Initializes red LED.
 */
void led_redInit(void);

/*
 * Toggles red LED.
 */
void led_redToggle(void);

/*
 * Switches red LED on.
 */
void led_redOn(void);

/*
 * Switches red LED off.
 */
void led_redOff(void);

/*
 * Initializes yellow LED.
 */
void led_yellowInit(void);

/*
 * Toggles yellow LED.
 */
void led_yellowToggle(void);

/*
 * Switches yellow LED on.
 */
void led_yellowOn(void);

/*
 * Switches yellow LED off.
 */
void led_yellowOff(void);

/*
 * Initializes green LED.
 */
void led_greenInit(void);

/*
 * Toggles green LED.
 */
void led_greenToggle(void);

/*
 * Switches green LED on.
 */
void led_greenOn(void);

/*
 * Switches green LED off.
 */
void led_greenOff(void);



#endif /* SES_LED_H_ */
